<?php
Yii::app()->clientScript->registerScript('search', "$('form#search_jenisreklame').submit(function()
            {
                $.fn.yiiGridView.update('jenisreklame-grid',{
                data:$(this).seriallize()
                });
                return false;
            });
        ");
?>

<h1>Data Jenis Reklame</h1>

<?php $this->renderPartial('_search', array('model' => $model,)); ?>
<?php
$this->widget('bootstrap.widgets.TBGridView', array(
    'id' => 'jenisreklame-grid',
    'dataProvider' => $model->search(),
    'type' => 'striped bordered condensed',
    'columns' => array(
        array(
            'header' => 'Nomor Rekening',
            'name' => 'no_rekening',
        ),
        array(
            'header' => 'Jenis Rekening',
            'name' => 'jenis_rekening',
        ),
        array(
            'header' => 'Nama Rekening',
            'name' => 'nama_rekening',
        ),        
        array(
            'class' => 'bootstrap.widgets.TbButtonColumn',
            'template' => '{update} ',
            'buttons' => array(
                'update' => array(
                    'url' => 'Yii::app()->createUrl("MasterFile/ReklameJenis/update", array("id"=>$data->id_jenis_rek))',
                ),
            ),
            'htmlOptions' => array('style' => 'width: 8%;text-align: center;'),
        ),
        array(
            'class' => 'bootstrap.widgets.TbButtonColumn',
            'template' => '{delete} ',
            'buttons' => array(
                'delete' => array(
                    'url' => 'Yii::app()->createUrl("MasterFile/ReklameJenis/delete", array("id"=>$data->id_jenis_rek))',
                ),
            ),
            'htmlOptions' => array('style' => 'width: 8%;text-align: center;'),
        )
    )
));
?>

<?php
$this->widget('bootstrap.widgets.TbButton', array(
    'type' => 'success',
    'icon' => 'icon-plus-sign',
    'label' => 'Tambah Pejabat',
    'url' => Yii::app()->createUrl('/MasterFile/ReklameJenis/create'),
    'htmlOptions' => array('style' => 'margin-top:20px'),
));
?>
